package cn.com.longfuinfo.wx.util;

import org.apache.log4j.Logger;

public class WeChatPageUtils {

	
	private static Logger log = Logger.getLogger(WeChatPageUtils.class);
	
	private static int pageSize = 10;//一页条数

	public static String getPageMsg(int totalRows) {
		int _pageCount = 1;

		if (totalRows % pageSize == 0) {
			_pageCount = (totalRows / pageSize);
		} else if (totalRows > 0) {
			_pageCount = (int) Math.ceil(totalRows / pageSize) + 1;
		}
		log.debug("总条数:"+totalRows);
		log.debug("一页条数:"+pageSize);
		log.debug("总页数:"+_pageCount);
		return String.valueOf(_pageCount);
	}
}
